package com.erqi.Controllers;

import com.erqi.pojo.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author king
 * @Date 2020/7/20 13:38
 * @Version 1.0  跳转cont
 */
@Controller
public class
ResponseController {
    @Autowired
    Message message;

    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    @RequestMapping("/logs")
    public String test(){
        return "logs";
    }


    @RequestMapping("/plcUser")
    public String toPlcUser(Model model){
        message.ini();
        model.addAttribute("OneKUser", message.getOneKUser());
        model.addAttribute("OneTUser", message.getOneTUser());
        model.addAttribute("TwoKUser", message.getTwoKUser());
        model.addAttribute("TwoTUser", message.getTwoTUser());
        model.addAttribute("ThreeKUser", message.getThreeKUser());
        model.addAttribute("ThreeTUser", message.getThreeTUser());
        model.addAttribute("FourKUser", message.getFourKUser());
        model.addAttribute("FourTUser", message.getFourTUser());
        model.addAttribute("Monitor", message.getMonitor());
        return "plc/plcDataList";
    }
    @RequestMapping("/toLogin")
    public String toLogin(String kt ,Model model){
        model.addAttribute("kt",kt);
        return "login/login";
    }
}
